***ODA data
*OECD (2023), Net ODA (indicator). doi: 10.1787/33346549-en (Accessed on 10 March 2023)
import excel "OECD Net ODA.xlsx", sheet("OECD Net ODA") firstrow clear

kountry LOCATION, from(iso3c) to (cown) geo(sov)
rename TIME year
rename _COWN_ cowcode
drop if cowcode==.
drop if MEASURE=="PC_GNI"
drop if SUBJECT=="ODAGRANT"
rename Value net_ODA

save "netODA.dta", replace


clear
use "ODA_women.dta", clear
 kountry country, from(other) stuck
 rename _ISO3N_ isocode
 kountry isocode, from(iso3n) to (cown) geo(sov)
 replace cowcode=_COWN_
 replace country= "East Timor" if country=="(East Timor)"
replace cowcode = 2 if country=="United States"
replace cowcode = 2 if country=="USA"

replace cowcode = 20 if country == "Canada"

replace cowcode = 31 if country=="Bahamas, The"
replace cowcode = 31 if country=="Bahamas"

replace cowcode = 40 if country=="Cuba"

replace cowcode = 41 if country == "Haiti"

replace cowcode = 42 if country == "Dominican Republic"
replace cowcode = 42 if country == "Dominican Rep."

replace cowcode = 51 if country == "Jamaica"
replace cowcode = 51 if country == "Jamaica "


replace cowcode = 52 if country == "Trinidad and Tobago"
replace cowcode = 52 if country == "Trinidad &Tobago"
replace cowcode = 52 if country == "Trinidad & Tobago"


replace cowcode = 53 if country == "Barbados"

replace cowcode = 54 if country == "Dominica"
replace cowcode = 54 if country == "Dominica "


replace cowcode = 55 if country == "Grenada"

replace cowcode = 56 if country == "St. Lucia"|country=="Saint Lucia"
replace cowcode = 56 if country == "St. Lucia"|country=="Saint Lucia"|country=="Saint Lucia "


replace cowcode = 57 if country == "St. Vincent and the Grenadines"
replace cowcode = 57 if country == "St.Vincent & Grenadines"
replace cowcode = 57 if country == "Saint Vincent and the Grenadines"

replace cowcode = 58 if country == "Antigua and Barbuda"
replace cowcode = 58 if country == "Antigua"

replace cowcode=60 if country=="St. Kitts and Nevis"
replace cowcode=60 if country=="St. Kitts & Nevis"

replace cowcode = 70 if country == "Mexico"

replace cowcode = 80 if country == "Belize "
replace cowcode = 80 if country == "Belize"

replace cowcode = 90 if country == "Guatemala"

replace cowcode = 91 if country == "Honduras"

replace cowcode = 92 if country == "El Salvador"
replace cowcode = 92 if country == "El Salvador "


replace cowcode = 93 if country == "Nicaragua"

replace cowcode = 94 if country == "Costa Rica"

replace cowcode = 95 if country == "Panama"

replace cowcode = 100 if country == "Colombia"
replace cowcode = 100 if country == "Columbia"

replace cowcode = 101 if country == "Venezuela"
replace cowcode = 101 if country == "Venezuela, RB"

replace cowcode = 110 if country == "Guyana"

replace cowcode=115 if country=="Suriname"
replace cowcode = 115 if country == "Surinam"
replace cowcode=115 if country=="Suriname "

replace cowcode = 130 if country == "Ecuador"

replace cowcode = 135 if country == "Peru"

replace cowcode = 140 if country == "Brazil"

replace cowcode = 145 if country == "Bolivia"

replace cowcode = 150 if country == "Paraguay"

replace cowcode = 155 if country == "Chile"

replace cowcode = 160 if country == "Argentina"

replace cowcode = 165 if country == "Uruguay"

replace cowcode = 200 if country == "United Kingdom"

replace cowcode = 205 if country == "Ireland"

replace cowcode = 210 if country == "Netherlands"

replace cowcode = 211 if country == "Belgium"

replace cowcode = 212 if country == "Luxembourg"
replace cowcode = 212 if country == "Luxemburg"


replace cowcode = 220 if country == "France"

replace cowcode = 221 if country == "Monaco"

replace cowcode = 223 if country == "Liechtenstein"|country=="Lichtenstein"

replace cowcode = 225 if country == "Switzerland"

replace cowcode = 230 if country == "Spain"

replace cowcode = 232 if country == "Andorra"

replace cowcode = 235 if country == "Portugal"

replace cowcode = 260 if country == "Germany"
replace cowcode = 260 if country=="West Germany"
replace cowcode = 260 if country=="Germany Federal Republic of"
replace cowcode = 260 if country=="Germany Federal Republic"
replace cowcode = 260 if country=="West Germany (FRG)"


replace cowcode=265 if country=="East Germany"
replace cowcode=265 if country=="German Democratic Republic"
replace cowcode=265 if country=="East Germany (GDR)"


replace cowcode = 290 if country == "Poland"
replace cowcode = 290 if country == "Poland "

replace cowcode = 305 if country == "Austria"

replace cowcode = 310 if country == "Hungary"

replace cowcode = 315 if country == "Czech Republic"
replace cowcode = 315 if country == "Czechoslovakia"

replace cowcode = 317 if country == "Slovak Republic"
replace cowcode = 317 if country == "Slovakia"
replace cowcode = 317 if country == "Slovakia "

replace cowcode = 325 if country == "Italy"

replace cowcode=331 if country=="San Marino"

replace cowcode = 338 if country == "Malta"

replace cowcode = 339 if country == "Albania "
replace cowcode = 339 if country == "Albania"


replace cowcode = 343 if country=="Macedonia" 
replace cowcode = 343 if country=="Macedonia, FYR" 

replace cowcode = 344 if country == "Croatia"

replace cowcode = 345 if country == "Yugoslavia"
replace cowcode = 345 if country == "Serbia and Montenegro"
replace cowcode = 345 if country == "Yugoslavia, FR (Serbia/Montenegro)" 
replace cowcode = 345 if country == "Serbia & Montenegro"
replace cowcode = 345 if country == "Serbia-Montenegro"
replace cowcode = 341 if country == "Montenegro"
replace cowcode = 345 if country == "Serbia"

replace cowcode = 346 if country=="Bosnia and Herzegovina "
replace cowcode = 346 if country=="Bosnia and Herzegovina"
replace cowcode = 346 if country=="Bosnia-Herzegovina"

replace cowcode = 349 if country == "Slovenia"

replace cowcode = 350 if country == "Greece"

replace cowcode = 352 if country == "Cyprus"
replace cowcode = 352 if country == "Cyprus "

replace cowcode = 355 if country == "Bulgaria"

replace cowcode = 359 if country=="Moldova" 

replace cowcode = 360 if country == "Romania"

replace cowcode = 365 if country == "Russia"
replace cowcode = 365 if country == "Russian Federation"
replace cowcode = 365 if country=="USSR"
replace cowcode = 365 if country=="Soviet Union"


replace cowcode = 366 if country == "Estonia"

replace cowcode = 367 if country == "Latvia"

replace cowcode = 368 if country == "Lithuania"

replace cowcode = 369 if country == "Ukraine"

replace cowcode = 370 if country == "Belarus"

replace cowcode = 371 if country == "Armenia"

replace cowcode = 372 if country == "Georgia"
replace cowcode = 372 if country == "Georgia "


replace cowcode = 373 if country == "Azerbaijan"

replace cowcode = 375 if country == "Finland"

replace cowcode = 380 if country == "Sweden"

replace cowcode = 385 if country == "Norway"

replace cowcode = 390 if country == "Denmark"

replace cowcode = 395 if country == "Iceland"

replace cowcode = 402 if country == "Cape Verde"

replace cowcode = 403 if country == "Sao Tome and Principe"
replace cowcode = 403 if country == "Sao Tome & Principe"

replace cowcode = 404 if country == "Guinea-Bissau"

replace cowcode = 411 if country == "Equatorial Guinea"

replace cowcode = 420 if country == "Gambia"
replace cowcode = 420 if country=="The Gambia" 
replace cowcode = 420 if country=="Gambia, The" 
replace cowcode = 420 if country == "Gambia "


replace cowcode = 432 if country == "Mali"
replace cowcode = 432 if country == "Mali "


replace cowcode = 433 if country == "Senegal"

replace cowcode = 434 if country == "Benin"

replace cowcode = 435 if country == "Mauritania"

replace cowcode = 436 if country == "Niger"

replace cowcode = 437 if country == "Ivory Coast"
replace cowcode = 437 if country == "Cote d'Ivoire"
replace cowcode = 437 if country == "Cote d`Ivoire"
replace cowcode = 437 if country == "Cote d¥Ivoire"
replace cowcode = 437 if country == "Ivory Coast "


replace cowcode = 438 if country == "Guinea"

replace cowcode = 439 if country == "Burkina Faso"

replace cowcode = 450 if country == "Liberia"

replace cowcode = 451 if country == "Sierra Leone"

replace cowcode = 452 if country == "Ghana"

replace cowcode = 461 if country == "Togo"

replace cowcode = 471 if country == "Cameroon"

replace cowcode = 475 if country == "Nigeria"

replace cowcode = 481 if country == "Gabon"

replace cowcode = 482 if country == "Central African Republic"

replace cowcode = 483 if country == "Chad"

replace country = "Congo Republic" if country=="Congo Republic of"
replace cowcode = 484 if country == "Congo Republic"
replace cowcode = 484 if country == "Congo, Rep."
replace cowcode = 484 if country=="Congo"
replace cowcode= 484 if country=="Congo, Republic of"
replace cowcode= 484 if country== "Congo Republic of the "
replace cowcode= 484 if country== "People's Republic of the Congo"
replace cowcode= 484 if country== "Republic of the Congo"

replace cowcode= 490 if country== "Congo , Democratic Republic"
replace cowcode = 490 if country == "Congo Democratic Republic"
replace cowcode = 490 if country=="Congo Democratic Republic of"
replace cowcode = 490 if country=="Congo, Dem. Rep."|country=="Congo, Democratic Republic Of"
replace cowcode = 490 if country=="Democratic Republic of the Congo"
replace cowcode = 490 if country=="Zaire"



replace cowcode = 500 if country == "Uganda"

replace cowcode = 501 if country == "Kenya"

replace cowcode = 510 if country == "Tanzania"

replace cowcode = 516 if country == "Burundi"

replace cowcode = 517 if country == "Rwanda"
replace cowcode = 517 if country == "Rwanda "

replace cowcode = 520 if country == "Somalia"
replace cowcode = 520 if country == "Somalia "


replace cowcode = 522 if country == "Djibouti"

replace cowcode = 530 if country == "Ethiopia"

replace cowcode = 531 if country == "Eritrea"
replace cowcode = 531 if country == "Eritrea "

replace cowcode = 540 if country == "Angola"

replace cowcode = 541 if country == "Mozambique"

replace cowcode = 551 if country == "Zambia"

replace cowcode = 552 if country == "Zimbabwe"

replace cowcode = 553 if country == "Malawi"

replace cowcode = 560 if country == "South Africa"
replace cowcode = 560 if country == "South Africa"


replace cowcode = 565 if country == "Namibia"

replace cowcode = 570 if country == "Lesotho"

replace cowcode = 571 if country == "Botswana"

replace cowcode = 572 if country == "Swaziland"
replace cowcode = 572 if country == "Swaziland "

replace cowcode = 580 if country == "Madagascar"

replace cowcode = 581 if country == "Comoros"

replace cowcode = 590 if country == "Mauritius"

replace cowcode = 591 if country == "Seychelles"
replace cowcode = 591 if country == "Seychelles "


replace cowcode = 600 if country == "Morocco"

replace cowcode = 615 if country == "Algeria "
replace cowcode = 615 if country == "Algeria"


replace cowcode = 616 if country == "Tunisia"

replace cowcode = 620 if country == "Libya"

replace cowcode = 625 if country == "Sudan"
replace cowcode = 625 if country == "Sudan "

replace cowcode = 626 if country == "South Sudan"


replace cowcode = 630 if country == "Iran"
replace cowcode = 630 if country == "Iran, Islamic Rep."
replace cowcode = 630 if country == "Iran, Islamic Republic"
replace cowcode = 630 if country == "Iran "


replace cowcode = 640 if country == "Turkey"

replace cowcode = 645 if country == "Iraq"

replace cowcode = 651 if country == "Egypt"
replace cowcode = 651 if country == "Egypt, Arab Rep."
replace cowcode = 651 if country == "Egypt, Arab Republic"

replace cowcode = 652 if country == "Syria"
replace cowcode = 652 if country == "Syrian Arab Republic"
replace cowcode = 652 if country == "Syrian Arab Rep."
replace cowcode = 652 if country == "Syria "

replace cowcode = 660 if country == "Lebanon"
replace cowcode = 660 if country == "Lebanon "

replace cowcode = 663 if country == "Jordan"

replace cowcode = 666 if country == "Israel"
replace cowcode = 666 if country == "Israel "


replace cowcode = 670 if country == "Saudi Arabia"
replace cowcode = 670 if country == "Saudi Arabia "

replace cowcode = 690 if country == "Kuwait"
replace cowcode = 690 if country == "Kuwait "


replace cowcode = 692 if country == "Bahrain"

replace cowcode = 694 if country == "Qatar"
replace cowcode = 694 if country == "Qatar "


replace cowcode = 696 if country == "United Arab Emirates"
replace cowcode = 696 if country == "United Arab Emirates "

replace cowcode = 698 if country == "Oman"

replace cowcode = 700 if country == "Afghanistan"

replace cowcode = 701 if country == "Turkmenistan"

replace cowcode = 702 if country == "Tajikistan"
replace cowcode = 702 if country == "Tajikistan "


replace cowcode = 703 if country == "Kyrgyz Republic"
replace cowcode = 703 if country == "Kyrgyzstan"

replace cowcode = 704 if country == "Uzbekistan"

replace cowcode = 705 if country == "Kazakhstan"

replace cowcode = 710 if country == "China"

replace cowcode = 712 if country == "Mongolia"

replace cowcode = 713 if country == "Taiwan"

replace cowcode = 731 if country=="Korea, Dem. Rep."
replace cowcode = 731 if country=="Korea, Democratic Republic"
replace cowcode = 731 if country=="Korea Democratic Republic"
replace cowcode = 731 if country=="Korea, North"

replace cowcode = 732 if country=="Korea Republic of"
replace cowcode = 732 if country=="Korea, Republic of"
replace cowcode = 732 if country=="Korea, Rep."
replace cowcode = 732 if country=="Korea, South"
replace cowcode = 732 if country== "South Korea"

replace cowcode = 740 if country == "Japan"

replace cowcode = 750 if country == "India"

replace cowcode = 760 if country == "Bhutan"

replace cowcode = 770 if country=="Pakistan"

replace cowcode = 771 if country == "Bangladesh"

replace cowcode = 775 if country == "Myanmar"
replace cowcode = 775 if country=="Burma" 

replace cowcode = 680 if country=="Yemen People's Republic" 
replace cowcode= 680 if country=="South Yemen"
replace cowcode = 679 if country=="Yemen" 
replace cowcode = 679 if country=="Yemen, Rep." 
replace cowcode = 679 if country=="Yemen Republic" 

replace cowcode=678 if country=="North Yemen"


replace cowcode = 780 if country == "Sri Lanka"
replace cowcode = 780 if country == "Sri Lanka "


replace cowcode=781 if country=="Maldives"

replace cowcode = 790 if country == "Nepal"

replace cowcode = 800 if country == "Thailand"

replace cowcode = 811 if country == "Cambodia"

replace cowcode = 812 if country == "Laos"
replace cowcode = 812 if country == "Lao PDR"
replace cowcode = 812 if country == "Laos "

replace cowcode = 818 if country == "Vietnam"

replace cowcode = 820 if country == "Malaysia"

replace cowcode = 830 if country =="Singapore"

replace cowcode = 835 if country =="Brunei"|country=="Brunei Darussalam" 

replace cowcode = 840 if country =="Philippines"

replace cowcode = 850 if country =="Indonesia"

replace cowcode=860 if country=="Timor-Leste"
replace cowcode=860 if country=="East Timor"

replace cowcode = 900 if country =="Australia"

replace cowcode = 910 if country =="Papua New Guinea"

replace cowcode = 920 if country =="New Zealand"
replace cowcode = 920 if country =="NewZealand"
replace cowcode = 920 if country =="NewZealand "



replace cowcode = 935 if country =="Vanuatu"

replace cowcode = 940 if country =="Solomon Islands"

replace cowcode = 946 if country=="Kiribati"

replace cowcode = 950 if country =="Fiji"

replace cowcode=955 if country=="Tonga"

replace cowcode=983 if country=="Marshall Islands"

replace cowcode=986  if country=="Palau"

replace cowcode = 987 if country=="Micronesia, Fed. Sts."
replace cowcode = 987 if country=="Micronesia"
replace cowcode = 987 if country=="Federated States of Micronesia"

replace cowcode=990 if country=="Samoa"

replace cowcode=347 if country=="Kosovo"

replace country="Vietnam" if country=="vie"
replace cowcode = 818 if country == "Vietnam"
replace cowcode=. if country == "Channel Islands"


replace ODA_women=. if year<2002
replace ODA_women=0 if country=="Palestine" & year>2001
replace ODA_women=0 if country=="Palestine" & year>2001

drop if cowcode==.

save "ODA_women_final.dta", replace

